import request from '@/utils/request'

// 根据 ID 更新权限点详情
export const updatePermissionByIdRequest = data => request.put(`/sys/permission/${data.id}`, data)

// 根据 ID 获取权限点详情
export const getPermissionByIdRequest = id => request.get(`/sys/permission/${id}`)

// 根据 ID 删除权限点
export const deletePermissionByIdRequest = id => request.delete(`/sys/permission/${id}`)

// 添加权限点
export const addPermissionRequest = data => request.post('/sys/permission', data)

// 获取所有权限点
export const getPermissionRequest = params => request.get('/sys/permission', { params })
